home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3415 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  32 lines

  1. Path: SPOD2.dev.esoc.esa.de!328PT
  2. From: 328pt@SPOD2.dev.esoc.esa.de (Phil Tregoning)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Please help ?!
  5. Date: 28 Jan 1996 20:23:33 GMT
  6. Organization: European Space Operations Center
  7. Message-ID: <4egm05$1da3@info.estec.esa.nl>
  8. References: <4dm889$3hs@neptunus.pi.net> <4drnv1$cr@news.iag.net> <4drq5i$cr@news.iag.net>    <4e6hse$dvl@ns.RezoNet.NET> <310a2389.49571776@nntp.ix.netcom.com>    <4eg6h8$1db5@info.estec.esa.nl> <TANMOY.96Jan28100725@qcd.lanl.gov>
  9. Reply-To: 328pt@SPOD2.dev.esoc.esa.de
  10. NNTP-Posting-Host: spod2.dev.esoc.esa.de
  11.  
  12.  
  13. tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya) writes:
  14.  
  15. [Talk about casting return from malloc() when stdlib.h is not
  16. #include'd]
  17.  
  18. >[...] The compiler _need not_ warn about an undeclared
  19. >function (i.e. such a warning is not mandated by ANSI: no warning is
  20. >however ever prohibited). Converting an int to a pointer without a
  21. >cast, however, needs a warning. On such compilers, then, avoiding the
  22. >cast can often help spot a fatal error.
  23.  
  24. Does converting one type of pointer to another (excluding void *)
  25. without an appropriate cast require a warning, or is that also up
  26. to the compliler ?  K&R2 says this is illegal. 
  27.  
  28. I agreed with everything else said, but I have yet to write anything
  29. that that could be called "magnificient products of art".
  30.  
  31. Phil Tregoning
  32.